Democracies have become fuckwit finding machines. Which would probably surprise anyone hearing of democracy for the first time. You would imagine that we elect real stand out dudes but it turns out we only do that when we hit rock bottom. Argentina and El Salvador were horrible places to live at the time that they chose competence. But why do they and every other democracy chose mediocrity the second they can afford it?
Interpersonal trust seems to be an important factor. Scandinavian countries show signs of choosing competence more readily as evidenced by Sweden in the pandemic and Estonia with their technocrats. However, Sweden is currently making a hash of immigration so their leaders aren't superhumanly prescient. NZ has slightly lower trust but still high and it seems to elect competent but extremely conservative leaders with the exception of Jacinta Adern. But she didn't last the full term and was replaced with a Cristian named Chris. NZ also allows a lot of immigration so it seems interpersonal trust and tolerance of immigrants is correlated. That's not surprising though these countries do a bad job of selecting immigrants that would allow their trust levels to remain high.